// @ts-ignore
import {ref} from "vue";

export default function useCounter(initValue: number) {
  const counter = ref(initValue)
  return {
    counter,
    increase: function () {
      counter.value ++
    },
    decrease: function () {
      counter.value --
    }
  }
}
